﻿<%@ Page Language="C#" MasterPageFile="~/travel-hotels/Travel_Hotels.master" AutoEventWireup="true"
    CodeFile="hotels-search.aspx.cs" Inherits="travel_hotels_hotels_search" %>

<%@ Register Src="../controls/usrCompanyBigLogoByServices.ascx" TagName="usrCompanyBigLogoByServices"
    TagPrefix="uc4" %>
<%@ Register Src="../controls/usrIdType.ascx" TagName="usrIdType" TagPrefix="uc6" %>
<%@ Register Src="~/controls/usrNoJS.ascx" TagName="usrNoJS" TagPrefix="ucNoJS" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link rel="stylesheet" type="text/css" href="/css/travel_countrylist.css" />
    <link rel="stylesheet" href="/css/travelcalendar.css" type="text/css" />
    <div class="elements_inner_wrapper">
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
        <div id="divContent" <%--style="display: none"--%>>
        <div class="left w575px" >
            <ucNoJS:usrNoJS ID="usrNoJS1" runat="server" />
            <!-- #Include file="../includes/body_loader.inc" -->
            <div>
                <div class="seperator">
                </div>
                <div class="searchbox">
                    <div class="top">
                        <div class="tabs">
                            <div class="left">
                                <ul>
                                    <li><a href="#" class="home">Hotels</a></li>
                                </ul>
                            </div>
                            <div class="_right txtright">
                                <h1>
                                    Find the cheapest hotel with CompareXpress Cheap Hotels</h1>
                            </div>
                        </div>
                    </div>
                    <div class="clear">
                    </div>
                    <!--IF MOVE TO TOP PROVIDER LOGO ROTATOR WILL NOT WORK-->

                    <script type="text/javascript" src="../js/jquery-1.5.1.js"></script>

                    <script type="text/javascript" src="../js/jquery.ui.datepicker.js"></script>

                    <script type="text/javascript" src="../js/jquery.ui.core.js"></script>

                    <script type="text/javascript" src="../js/jquery.ui.widget.js"></script>

                    <!--END MOVE TO TOP PROVIDER LOGO ROTATOR WILL NOT WORK-->
                    <div class="body">
                        <div class="button_manage-booking right">
                        <div class="pad txt_center"><asp:HyperLink ID="hlnkManage" runat="server" Text=">> manage a booking"></asp:HyperLink></div>
                        </div>
                        <h1>
                            Find a hotel near a city :</h1>
                        <div class="seperator">
                        </div>
                        <div class="left">
                            <div style="display: none;">
                                <%--<asp:DropDownList ID="ddlDestCity" runat="server" class="text" >
                            </asp:DropDownList>
                          <asp:RequiredFieldValidator ID="rfvDestCity" InitialValue="-1" runat="server" ControlToValidate="ddlDestCity"
                                CssClass="validationErrorControl" ErrorMessage="" ValidationGroup="travel_insurance"></asp:RequiredFieldValidator>--%>
                            </div>                                                     
                            <asp:TextBox ID="txtHotelCity" runat="server" Width="400px" CssClass="input" AutoCompleteType="Disabled"
                                onfocus="disableautocompletion(this.id);"></asp:TextBox>
                           <%-- <div id="divwidth" >
                            </div>--%>
                            <input id="inputSelCityName" type="hidden" runat="server" />
                            <input id="inputSelectedDestId" type="hidden" runat="server" />
                            <asp:RequiredFieldValidator ID="rfvHotel" InitialValue="" runat="server" ControlToValidate="txtHotelCity"
                                ErrorMessage="" ValidationGroup="hotel-search"></asp:RequiredFieldValidator>
                            <cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtHotelCity"
                                FirstRowSelected="true" MinimumPrefixLength="3" EnableCaching="true" CompletionSetCount="10"
                                CompletionInterval="1000" ServiceMethod="GetLocationSearchNew" OnClientPopulating="ShowProcessImage"
                                OnClientPopulated="HideProcessImage" OnClientItemSelected="SelectedCity" CompletionListCssClass="AutoExtender"
                                CompletionListItemCssClass="AutoExtenderList" CompletionListHighlightedItemCssClass="AutoExtenderHighlight"
                                >
                            </cc1:AutoCompleteExtender>
                        </div>
                        <div class=" pad_15 left">
                        </div>
                        <div class="seperator"></div>
                        <div class="details">
                            <div class="top">
                                <div style="height: 3px;">
                                </div>
                                <div style="padding-left: 15px">
                                    <h1>
                                        Details</h1>
                                </div>
                            </div>
                            <div class="body">
                                <div>
                                    <div class="left">
                                        <strong>Check-in</strong> <em>(dd/mm/yyyy)</em><br />
                                        <%--  <asp:TextBox runat="server" ID="txtCheckinDate" Width="150px" CssClass="input"></asp:TextBox>--%>
                                        <input id="from" name="from" type="text" readonly="readonly" value="dd/mm/yyyy" class="input" style="width:120px" />
                                        <input id="inputCheckinDate" type="hidden" runat="server" />
                                    </div>
                                    <div class="pad_5 left">
                                    </div>
                                    <div class="left">
                                        <strong>Check-out</strong> <em>(dd/mm/yyyy)</em><br />
                                        <%--  <asp:TextBox runat="server" ID="txtCheckoutDate" Width="150px" CssClass="input"></asp:TextBox>--%>
                                        <input id="to" name="to" type="text" readonly="readonly" value="dd/mm/yyyy"  class="input" style="width:120px" />
                                        <input id="inputCheckoutDate" type="hidden" runat="server" />
                                    </div>
                                    <div class="pad_5 left">
                                    </div>
                                    <div class="left">
                                        <br />
                                        <asp:CheckBox ID="chkNoDate" runat="server" Text="I don't have specific dates yet"
                                            onchange="changeNoDate()" Visible="false" />
                                    </div>
                                </div>

                                <script type="text/javascript">
                                    IncreaseProgress(50);
                                </script>


                                <div>

                                    <div class="left">
                                        <strong>Rooms</strong>
                                        <br />
                                        <div style="text-align:right; padding-right:30px;">
                                            <asp:DropDownList runat="server" ID="ddlRooms" onchange="RoomShowHide();" style="margin-top:2px;">
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                                <asp:ListItem Value="4">4</asp:ListItem>
                                                <asp:ListItem Value="5">5</asp:ListItem>
                                                <asp:ListItem Value="6">6</asp:ListItem>
                                                <asp:ListItem Value="7">7</asp:ListItem>
                                                <asp:ListItem Value="8">8</asp:ListItem>
                                            </asp:DropDownList>
                                        </div>
                                    </div>
                                    <div id="divRoom1" style="border-bottom:1px solid white; padding-bottom:4px;">
                                        <div class="left">
                                            <strong>Adults</strong> <em>(age 18+)</em><br />
                                            <div style="text-align:right; padding-right:10px;">
                                                Room 1:
                                                <asp:DropDownList runat="server" ID="ddlAdultsRoom1" style="margin-top:2px;">
                                                    <asp:ListItem Value="1">1</asp:ListItem>
                                                    <asp:ListItem Value="2" Selected="True">2</asp:ListItem>
                                                    <asp:ListItem Value="3">3</asp:ListItem>
                                                    <asp:ListItem Value="4">4</asp:ListItem>
                                                    <asp:ListItem Value="5">5</asp:ListItem>
                                                    <asp:ListItem Value="6">6</asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                        <div class="left" style="padding:2px;">
                                        </div>

                                        <div>
                                            <strong>Children</strong> <em>(age 0-17)</em><br />
                                            <div style="text-align:right; margin-right:3px;">
                                                <asp:DropDownList runat="server" ID="ddlChildrenRoom1" onchange="ChildAgeShowHide(1);" style="margin-top:2px;">
                                                    <asp:ListItem Value="0">0</asp:ListItem>
                                                    <asp:ListItem Value="1">1</asp:ListItem>
                                                    <asp:ListItem Value="2">2</asp:ListItem>
                                                    <asp:ListItem Value="3">3</asp:ListItem>
                                                </asp:DropDownList>
                                            </div>
                                            
                                            <div class="clear"></div>

                                            <div id="divChildRoom1Child1Age" style="display:none; float:right;">
                                                <strong>Age of children:</strong> 
                                                <asp:DropDownList runat="server" ID="ddlChildRoom1Child1Age">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="clear"></div>
                                            <div id="divChildRoom1Child2Age" style="display:none;  float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom1Child2Age">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="clear"></div>
                                            <div id="divChildRoom1Child3Age" style="display:none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom1Child3Age">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="clear"></div>
                                            <div id="divChildRoom1Child4Age" style="display:none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom1Child4Age">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="clear"></div>

                                    <div id="divRoom2" style="margin-left:352px; display:none; width:205px;padding-bottom:5px; border-bottom:1px solid white">
                                        <div style="padding-top:2px;">
                                            Room 2:
                                            <asp:DropDownList runat="server" ID="ddlAdultsRoom2" style="margin-top:2px;">
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2" Selected="True">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                                <asp:ListItem Value="4">4</asp:ListItem>
                                                <asp:ListItem Value="5">5</asp:ListItem>
                                                <asp:ListItem Value="6">6</asp:ListItem>
                                            </asp:DropDownList>

                                            <div style="float:right; padding-top:2px;">
                                            <asp:DropDownList runat="server" ID="ddlChildrenRoom2" onchange="ChildAgeShowHide(2);">
                                                <asp:ListItem Value="0">0</asp:ListItem>
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                            </asp:DropDownList>
                                            </div>
                                            <div class="clear"></div>
                                            <div id="divChildRoom2Child1Age" style="display: none;float:right;">
                                                Age of children
                                                <asp:DropDownList runat="server" ID="ddlChildRoom2Child1Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="clear"></div>                                            
                                            <div id="divChildRoom2Child2Age" style="display: none;float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom2Child2Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="clear"></div>
                                            <div id="divChildRoom2Child3Age" style="display: none;float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom2Child3Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="clear"></div>
                                            <div id="divChildRoom2Child4Age" style="display: none;float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom2Child4Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="clear"></div>

                                    <div id="divRoom3" style="margin-left:352px; display:none; width:205px;padding-bottom:5px; border-bottom:1px solid white">
                                        <div>
                                            Room 3:
                                            <asp:DropDownList runat="server" ID="ddlAdultsRoom3" >
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2" Selected="True">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                                <asp:ListItem Value="4">4</asp:ListItem>
                                                <asp:ListItem Value="5">5</asp:ListItem>
                                                <asp:ListItem Value="6">6</asp:ListItem>
                                            </asp:DropDownList>
                                            
                                            <div style="float:right; padding-top:2px;">
                                            <asp:DropDownList runat="server" ID="ddlChildrenRoom3" onchange="ChildAgeShowHide(3);">
                                                <asp:ListItem Value="0">0</asp:ListItem>
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                            </asp:DropDownList>
                                            </div>
                                            <div class="clear"></div>
                                            <div id="divChildRoom3Child1Age" style="display: none; float:right;">
                                                Age of children
                                                <asp:DropDownList runat="server" ID="ddlChildRoom3Child1Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="clear"></div>
                                            <div id="divChildRoom3Child2Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom3Child2Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="clear"></div>
                                            <div id="divChildRoom3Child3Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom3Child3Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="clear"></div>
                                            <div id="divChildRoom3Child4Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom3Child4Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="divRoom4" style="margin-left:352px; display:none; width:205px;padding-bottom:5px; border-bottom:1px solid white">
                                        <div>
                                            Room 4:
                                            <asp:DropDownList runat="server" ID="ddlAdultsRoom4">
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2" Selected="True">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                                <asp:ListItem Value="4">4</asp:ListItem>
                                                <asp:ListItem Value="5">5</asp:ListItem>
                                                <asp:ListItem Value="6">6</asp:ListItem>
                                            </asp:DropDownList>
                                            
                                            <div style="float:right; padding-top:2px;">
                                            <asp:DropDownList runat="server" ID="ddlChildrenRoom4" onchange="ChildAgeShowHide(4);">
                                                <asp:ListItem Value="0">0</asp:ListItem>
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                            </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom4Child1Age" style="display: none; float:right;">
                                                Age of children
                                                <asp:DropDownList runat="server" ID="ddlChildRoom4Child1Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom4Child2Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom4Child2Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom4Child3Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom4Child3Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom4Child4Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom4Child4Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="divRoom5" style="margin-left:352px; display:none; width:205px;padding-bottom:5px; border-bottom:1px solid white">
                                        <div >
                                            Room 5:
                                            <asp:DropDownList runat="server" ID="ddlAdultsRoom5">
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2" Selected="True">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                                <asp:ListItem Value="4">4</asp:ListItem>
                                                <asp:ListItem Value="5">5</asp:ListItem>
                                                <asp:ListItem Value="6">6</asp:ListItem>
                                            </asp:DropDownList>
                                           
                                            <div style="float:right; padding-top:2px;">
                                            <asp:DropDownList runat="server" ID="ddlChildrenRoom5" onchange="ChildAgeShowHide(5);">
                                                <asp:ListItem Value="0">0</asp:ListItem>
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                            </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom5Child1Age" style="display: none; float:right;">
                                                Age of children
                                                <asp:DropDownList runat="server" ID="ddlChildRoom5Child1Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom5Child2Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom5Child2Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom5Child3Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom5Child3Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom5Child4Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom5Child4Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="divRoom6" style="margin-left:352px; display:none; width:205px;padding-bottom:5px; border-bottom:1px solid white">
                                        <div>
                                            Room 6:
                                            <asp:DropDownList runat="server" ID="ddlAdultsRoom6">
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2" Selected="True">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                                <asp:ListItem Value="4">4</asp:ListItem>
                                                <asp:ListItem Value="5">5</asp:ListItem>
                                                <asp:ListItem Value="6">6</asp:ListItem>
                                            </asp:DropDownList>
                                            
                                            <div style="float:right; padding-top:2px;">
                                            <asp:DropDownList runat="server" ID="ddlChildrenRoom6" onchange="ChildAgeShowHide(6);">
                                                <asp:ListItem Value="0">0</asp:ListItem>
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                            </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom6Child1Age" style="display: none; float:right;">
                                                Age of children
                                                <asp:DropDownList runat="server" ID="ddlChildRoom6Child1Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom6Child2Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom6Child2Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom6Child3Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom6Child3Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom6Child4Age" style="display: none; float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom6Child4Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="divRoom7" style="margin-left:352px; display:none; width:205px;padding-bottom:5px; border-bottom:1px solid white">
                                        <div>
                                            Room 7:
                                            <asp:DropDownList runat="server" ID="ddlAdultsRoom7">
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2" Selected="True">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                                <asp:ListItem Value="4">4</asp:ListItem>
                                                <asp:ListItem Value="5">5</asp:ListItem>
                                                <asp:ListItem Value="6">6</asp:ListItem>
                                            </asp:DropDownList>
                                            
                                            <div style="float:right; padding-top:2px;">
                                            <asp:DropDownList runat="server" ID="ddlChildrenRoom7" onchange="ChildAgeShowHide(7);">
                                                <asp:ListItem Value="0">0</asp:ListItem>
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                            </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom7Child1Age" style="display: none;float:right;">
                                                Age of children
                                                <asp:DropDownList runat="server" ID="ddlChildRoom7Child1Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom7Child2Age" style="display: none;float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom7Child2Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom7Child3Age" style="display: none;float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom7Child3Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom7Child4Age" style="display: none;float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom7Child4Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                    <div id="divRoom8" style="margin-left:352px; display:none; width:205px;padding-bottom:5px; border-bottom:1px solid white">
                                        <div>
                                            Room 8:
                                            <asp:DropDownList runat="server" ID="ddlAdultsRoom8">
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2" Selected="True">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                                <asp:ListItem Value="4">4</asp:ListItem>
                                                <asp:ListItem Value="5">5</asp:ListItem>
                                                <asp:ListItem Value="6">6</asp:ListItem>
                                            </asp:DropDownList>
                                            
                                            <div style="float:right; padding-top:2px;">
                                            <asp:DropDownList runat="server" ID="ddlChildrenRoom8" onchange="ChildAgeShowHide(8);">
                                                <asp:ListItem Value="0">0</asp:ListItem>
                                                <asp:ListItem Value="1">1</asp:ListItem>
                                                <asp:ListItem Value="2">2</asp:ListItem>
                                                <asp:ListItem Value="3">3</asp:ListItem>
                                            </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom8Child1Age" style="display: none;float:right;">
                                                Age of children
                                                <asp:DropDownList runat="server" ID="ddlChildRoom8Child1Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom8Child2Age" style="display: none;float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom8Child2Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom8Child3Age" style="display: none;float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom8Child3Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                             <div class="clear"></div>
                                            <div id="divChildRoom8Child4Age" style="display: none;float:right;">
                                                <asp:DropDownList runat="server" ID="ddlChildRoom8Child4Age" CssClass="input">
                                                </asp:DropDownList>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="seperator"></div>
                            <div class="clear"></div>
                        </div>
                        
                        <div class="seperator">
                        </div>
                        <div class="right">
                            <!-- COMPARE BUTTON [[[[ old one ]]] -->
                            <!-- COMPARE BUTTON [[[[ old one ]]] -->
                            <!-- COMPARE BUTTON [[[[ NEW ONE ]]] -->
                            <asp:Button ID="start" CssClass="button_search" onmousedown="this.className
                                = 'button_search_mousedown';" onmouseup="this.className = 'button_search';" onmouseout="this.className
                                = 'button_search';" runat="server" Style="margin-right: 7px;" OnClick="btnSearch_Click" ValidationGroup="hotel-search"
                                OnClientClick="LoadValidationErrorCss();if (checkValidation()){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'button_processing';}else{return false;}" />
                            <!-- COMPARE BUTTON [[[[ NEW ONE ]]] -->
                        </div>
                        <div>
                            <asp:Label ID="lblMessage" runat="server" Font-Bold="true" ForeColor="Red" Visible="false"></asp:Label>
                        </div>

                    </div>
                    <div class="bottom">
                    </div>
                </div>
                <div style="display: none;">
                    <asp:Label ID="lblTest" runat="server"></asp:Label>
                    <br />
                    --------------------------------------------
                    <asp:Label ID="lblTest2" runat="server"></asp:Label>
                    <br />
                    --------------------------------------------
                    <asp:Label ID="lblTest3" runat="server"></asp:Label>
                </div>
            </div>
        </div>

        <script type="text/javascript">                    
            IncreaseProgress(80);
        </script>


        <div class="left" style="width: 222px;">
        </div>
        <div class="right" style="width: 370px;">
            <a href="/travel-insurance/"><img src="/images/flights/tag_hotels.png" alt="Cheapest Hotels Around the Globe!"
                title="Cheapest Hotels Around the Globe!" style="padding-top: 50px" /></a>
            <div class="seperator"></div>
        </div>
        <div class="seperator">
        </div>

</div>

        <script type="text/javascript">

          window.onload = function() {
              if (document.getElementById('<%=inputCheckinDate.ClientID%>').value != '') {
                  document.getElementById('from').value = document.getElementById('<%=inputCheckinDate.ClientID%>').value;
              }

              if (document.getElementById('<%=inputCheckoutDate.ClientID%>').value != '') {
                  document.getElementById('to').value = document.getElementById('<%=inputCheckoutDate.ClientID%>').value;
              }

              if (document.getElementById('<%=inputSelCityName.ClientID%>').value != "") {
                  document.getElementById('<%=txtHotelCity.ClientID%>').value = document.getElementById('<%=inputSelCityName.ClientID%>').value;
              }

              RoomShowHide();

              ChildAgeShowHide(1);
              ChildAgeShowHide(2);
              ChildAgeShowHide(3);
              ChildAgeShowHide(4);
              ChildAgeShowHide(5);
              ChildAgeShowHide(6);
              ChildAgeShowHide(7);
              ChildAgeShowHide(8);
          }

          $(function() {
              var dates = $("#from").datepicker({
                  //showAnim: 'slideDown',
                  defaultDate: "+1w",
                  changeMonth: true,
                  numberOfMonths: 2,
                  dateFormat: "dd/mm/yy",
                  //minDate: '+1d',
                  beforeShow: setFromRange,
                  onSelect: function(selectedDate) {
                      var option = this.id == "from" ? "minDate" : "maxDate",
	        instance = $(this).data("datepicker"),
	        date = $.datepicker.parseDate(
		        instance.settings.dateFormat ||
		        $.datepicker._defaults.dateFormat,
		        selectedDate, instance.settings);
                      dates.not(this).datepicker("option", option, date);

                      var newDate = $(this).datepicker('getDate');
                      var toDate = $('#to').datepicker('getDate');
                      if (newDate) { // Not null
                          newDate.setDate(newDate.getDate() + 2);

                          if (newDate > toDate) {
                              $('#to').datepicker('setDate', newDate);

                          }
                      }
                  }
              });

              var dates = $("#to").datepicker({
                  defaultDate: "+1w",
                  changeMonth: true,
                  numberOfMonths: 2,
                  dateFormat: "dd/mm/yy",
                  //minDate: '+1d',
                  beforeShow: setToRange,
                  onSelect: function(selectedDate) {
                      var option = this.id == "from" ? "minDate" : "maxDate",
	        instance = $(this).data("datepicker"),
	        date = $.datepicker.parseDate(
		        instance.settings.dateFormat ||
		        $.datepicker._defaults.dateFormat,
		        selectedDate, instance.settings);
                      dates.not(this).datepicker("option", option, date);
                  }
              });


              function setToRange() {

                  var next183Days;
                  next183Days = $("#from").datepicker('getDate');
                  next183Days.setDate(next183Days.getDate() + 182);

                  var minDate = $("#from").datepicker('getDate');
                  minDate.setDate(minDate.getDate() + 1);

                  var maxDate = next183Days;

                  return {

                      minDate: minDate,
                      maxDate: maxDate

                  }

              }

              function setFromRange() {

                  var fullDate = new Date();
                  fullDate.setDate(fullDate.getDate() + 1);

                  var min183Days;
                  min183Days = $("#to").datepicker('getDate');
                  min183Days.setDate(min183Days.getDate() - 183);

                  var minDate = min183Days;
                  var maxDate = $("#to").datepicker('getDate');

                  if (min183Days < fullDate) {
                      minDate = fullDate;
                  }

                  return {

                      minDate: minDate
                      //maxDate: maxDate

                  }

              }

          });

          function ShowProcessImage() {

              var autocomplete = document.getElementById('<%=txtHotelCity.ClientID%>');
              autocomplete.className = 'inputCountry';
              autocomplete.style.backgroundImage = 'url(../images/loader/small_loading.gif)';
              autocomplete.style.backgroundRepeat = 'no-repeat';
              autocomplete.style.backgroundPosition = 'right';
          }
          function HideProcessImage() {
              var autocomplete = document.getElementById('<%=txtHotelCity.ClientID%>');
              autocomplete.style.backgroundImage = 'none';
              autocomplete.className = 'inputCountry';
          }

          function SelectedCity(source, eventArgs) {
              //var autocomplete = document.getElementById('<%=txtHotelCity.ClientID%>');

              var hdnValueID = "<%=inputSelectedDestId.ClientID %>";
              document.getElementById(hdnValueID).value = eventArgs.get_value();
          }

          function disableautocompletion(id) {
              var txtControl = document.getElementById(id);
              txtControl.setAttribute("autocomplete", "off");
          }

          function ValidateSearchFields() {

              if (document.getElementById('from').value == '') {
                  document.getElementById('from').className = 'inputValidation';
                  return false;
              }
              else {
                  document.getElementById('from').className = '';
              }

              if (document.getElementById('to').value == '') {
                  document.getElementById('to').className = 'inputValidation';
                  return false;
              }
              else {
                  document.getElementById('to').className = '';
              }

              return true
          }

          function checkValidation() {

              if (Page_ClientValidate('hotel-search')) {

                  var isvalid = new Boolean(ValidateSearchFields());

                  if (isvalid.toString() == 'true') {
                      document.getElementById('<%=inputCheckinDate.ClientID%>').value = document.getElementById('from').value;
                      document.getElementById('<%=inputCheckoutDate.ClientID%>').value = document.getElementById('to').value;

                      //                    if (document.getElementById('<%=txtHotelCity.ClientID%>').value == document.getElementById('<%=inputSelCityName.ClientID%>').value) {
                      //                        return true;
                      //                    }
                      //                    else {
                      //                        document.getElementById('<%=txtHotelCity.ClientID%>').className = 'inputValidation';

                      //                    }

                      return true;
                  }

              }
              else {
                  if (document.getElementById('<%=txtHotelCity.ClientID%>').value == '') {
                      document.getElementById('<%=txtHotelCity.ClientID%>').className = 'inputValidation';
                  }
                  return false;
              }

          }

          function changeNoDate() {

              if (document.getElementById('<%=chkNoDate.ClientID%>').checked) {
                  document.getElementById('from').value = 'dd/mm/yyyy';
                  document.getElementById('to').value = 'dd/mm/yyyy';
              }
              else {
                  var d = new Date();
                  document.getElementById('from').value = document.getElementById('<%=inputCheckinDate.ClientID%>').value;
                  document.getElementById('to').value = document.getElementById('<%=inputCheckoutDate.ClientID%>').value;
              }
          }

          function ShowHideDiv(divName, varOnOff) {
              if (varOnOff) {
                  document.getElementById(divName).style.display = "";
              }
              else {
                  document.getElementById(divName).style.display = "none";
              }
          }

          function RoomShowHide() {
              var _count = document.getElementById('<%=ddlRooms.ClientID%>').value;

              for (var i = 1; i <= 8; i++) {
                  if (_count >= i)
                      ShowHideDiv('divRoom' + i.toString(), true);
                  else
                      ShowHideDiv('divRoom' + i.toString(), false);
              }
          }

          function ChildAgeShowHide(roomNo) {


              var _count = 0;

              if (roomNo == 1) {
                  _count = document.getElementById('<%=ddlChildrenRoom1.ClientID%>').value;

                  for (var i = 1; i <= 4; i++) {
                      if (_count >= i)
                          ShowHideDiv('divChildRoom1Child' + i.toString() + 'Age', true);
                      else
                          ShowHideDiv('divChildRoom1Child' + i.toString() + 'Age', false);
                  }
              }

              if (roomNo == 2) {
                  _count = document.getElementById('<%=ddlChildrenRoom2.ClientID%>').value;

                  for (var i = 1; i <= 4; i++) {
                      if (_count >= i)
                          ShowHideDiv('divChildRoom2Child' + i.toString() + 'Age', true);
                      else
                          ShowHideDiv('divChildRoom2Child' + i.toString() + 'Age', false);
                  }
              }

              if (roomNo == 3) {
                  _count = document.getElementById('<%=ddlChildrenRoom3.ClientID%>').value;

                  for (var i = 1; i <= 4; i++) {
                      if (_count >= i)
                          ShowHideDiv('divChildRoom3Child' + i.toString() + 'Age', true);
                      else
                          ShowHideDiv('divChildRoom3Child' + i.toString() + 'Age', false);
                  }
              }

              if (roomNo == 4) {
                  _count = document.getElementById('<%=ddlChildrenRoom4.ClientID%>').value;

                  for (var i = 1; i <= 4; i++) {
                      if (_count >= i)
                          ShowHideDiv('divChildRoom4Child' + i.toString() + 'Age', true);
                      else
                          ShowHideDiv('divChildRoom4Child' + i.toString() + 'Age', false);
                  }
              }

              if (roomNo == 5) {
                  _count = document.getElementById('<%=ddlChildrenRoom5.ClientID%>').value;

                  for (var i = 1; i <= 4; i++) {
                      if (_count >= i)
                          ShowHideDiv('divChildRoom5Child' + i.toString() + 'Age', true);
                      else
                          ShowHideDiv('divChildRoom5Child' + i.toString() + 'Age', false);
                  }
              }

              if (roomNo == 6) {
                  _count = document.getElementById('<%=ddlChildrenRoom6.ClientID%>').value;

                  for (var i = 1; i <= 4; i++) {
                      if (_count >= i)
                          ShowHideDiv('divChildRoom6Child' + i.toString() + 'Age', true);
                      else
                          ShowHideDiv('divChildRoom6Child' + i.toString() + 'Age', false);
                  }
              }

              if (roomNo == 7) {
                  _count = document.getElementById('<%=ddlChildrenRoom7.ClientID%>').value;

                  for (var i = 1; i <= 4; i++) {
                      if (_count >= i)
                          ShowHideDiv('divChildRoom7Child' + i.toString() + 'Age', true);
                      else
                          ShowHideDiv('divChildRoom7Child' + i.toString() + 'Age', false);
                  }
              }

              if (roomNo == 8) {
                  _count = document.getElementById('<%=ddlChildrenRoom8.ClientID%>').value;

                  for (var i = 1; i <= 4; i++) {
                      if (_count >= i)
                          ShowHideDiv('divChildRoom8Child' + i.toString() + 'Age', true);
                      else
                          ShowHideDiv('divChildRoom8Child' + i.toString() + 'Age', false);
                  }
              }

          }

          IncreaseProgress(100);

          HideLoading();

        </script>
   </div>
</asp:Content>
